//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopOrderAction, MinishopOrderActionResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopOrderActionList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopOrderActionResponse>(`/uctoo/minishop_order_action/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopOrderAction = async (id: string) => {
  return requestClient.get<MinishopOrderAction>(`/uctoo/minishop_order_action/${id}`);
};

export const adductooMinishopOrderAction = async (data: Partial<MinishopOrderAction>) => {
  return requestClient.post<MinishopOrderAction>('/uctoo/minishop_order_action/add', data);
};

export const edituctooMinishopOrderAction = async (data: Partial<MinishopOrderAction>) => {
  return requestClient.post<MinishopOrderAction>('/uctoo/minishop_order_action/edit', data);
};

export const deleteuctooMinishopOrderAction = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_order_action/del', { id });
};
